garyaustin
04/09/2022, 10:37 PMconst inputElement = document.getElementById("input1");
inputElement.addEventListener("change", handleFiles, false);
function handleFiles() {
const fileList = this.files;
console.log(fileList)
const avatarFile = fileList[0]
const { data, error } = supabase
.storage
.from('test')
.upload('public/avatar1.png', avatarFile, {
cacheControl: '3600',
upsert: false
})
}
Lucas T
04/09/2022, 10:41 PMLucas T
04/09/2022, 10:42 PMgaryaustin
04/09/2022, 10:46 PMLucas T
04/09/2022, 10:46 PMgaryaustin
04/09/2022, 10:47 PMLucas T
04/09/2022, 10:47 PMLucas T
04/09/2022, 11:06 PMjs
var {banner_public_url, error} = supabase
.storage
.from('song-icon')
.getPublicUrl(uuid); // Please don't comment on the code
console.log(banner_public_url)
and it just prints "undefined"garyaustin
04/09/2022, 11:13 PMgaryaustin
04/09/2022, 11:13 PMLucas T
04/09/2022, 11:15 PMLucas T
04/09/2022, 11:16 PMgaryaustin
04/09/2022, 11:19 PMLucas T
04/09/2022, 11:19 PMgaryaustin
04/09/2022, 11:21 PMLucas T
04/09/2022, 11:22 PM